﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            Onecar oc = new Onecar("一台");
            oc.Run();
            Batcar bat = new Batcar("一台蝙蝠");
            bat.Run();
            bat.fly();
        }
    }

    class Onecar : Car
    {
        public Onecar(string brand) : base(brand)
        {

        }
        public override void Run()
        {
            Console.WriteLine("{0}车在跑", this.Brand);
        }
    }
    class Batcar : Car, IFIyable
    {
        public Batcar(string brand) : base(brand)
        { }
        public void fly()
        {
            Console.WriteLine("{0]车在飞", this.Brand);

        }
        public override void Run()
        {
            Console.WriteLine("{0}车在跑", this.Brand);
        }
    }
    abstract class Car
    {
        private string brand;

        public string Brand { get; set; }

        public Car(string brand)
        {
            Brand = brand;
        }
        public abstract void Run();
    }

}
